<?php
ob_start();
session_start();
session_destroy();
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Login Form</title>
  <link rel="stylesheet" href="css/login.css">
  <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
  <section class="container">
    <div class="login">
      <h1>Login to my Awesome Junett Website</h1>
      <form method="post" action="">
        <p><input type="text" name="login" value="" placeholder="Username"></p>
        <p><input type="password" name="password" value="" placeholder="Password"></p>
        
        <p class="submit"><input type="submit" name="btnSubmit" value="Login"></p>
      </form>
    </div>

    <div class="login-help">
      <?php
	  if(isset($_GET['err']))
	  {
		  echo"<p>Enter Username and Password muna</p>";
	  }
	  else
	   {
			if(isset($_POST['btnSubmit']))
			{
				if($_POST['login'] == 'Junett' && $_POST['password'] == 'Junett25')
				{
				   session_start();	
				   $_SESSION['name'] = 'junett';
				   header('Location: admin.php');
				}
				else
				{
				   echo "<p style='color:#F00'>Are you kidding me Junett?</p>";	
				}    	  
			}else
			{
			  echo"<p>Forgot your password? I hope not. =)</p>";	
			}
	   }
?>
    </div>
  </section>
</body>
</html>

